Skip to content

swayidle: Add support for idlehint#8997

Open
sochotnicky wants to merge 1 commit intonix-community:masterfrom
sochotnicky:sochotnicky/support-idlehint
Open

swayidle: Add support for idlehint#8997
sochotnicky wants to merge 1 commit intonix-community:masterfrom
sochotnicky:sochotnicky/support-idlehint

Conversation

@sochotnicky
Copy link
Copy Markdown

@sochotnicky sochotnicky commented Mar 29, 2026

Description

This adds support for idlehint configuration to notify systemd about
idle session.

I've taken a simple path to define a plain new option. I think it makes most
sense since it's the only one that has a timeout but no command. But I can tweak
to make it something like swayidle.idlehint.timeout or something similar if that makes more sense. I couldn't come up with a nice way to integrate with timeouts or events.

Checklist

  • Change is backwards compatible.

  • Code formatted with nix fmt or
    nix-shell -p treefmt nixfmt deadnix keep-sorted nixf-diagnose --run treefmt.

  • Code tested through nix run .#tests -- test-all or
    nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.
    • Generate a news entry. See News
    • Basic tests added. See Tests
  • If this PR adds an exciting new feature or contains a breaking change.

    • Generate a news entry. See News

@sochotnicky sochotnicky force-pushed the sochotnicky/support-idlehint branch from aa3617f to 5802fe7 Compare March 29, 2026 20:22
@sochotnicky sochotnicky force-pushed the sochotnicky/support-idlehint branch from 5802fe7 to 9db4c22 Compare March 30, 2026 16:25
@sochotnicky sochotnicky force-pushed the sochotnicky/support-idlehint branch from 54b02db to a32275d Compare April 1, 2026 21:51
This adds support for idlehint configuration to notify systemd about
idle session.

Co-authored-by: Austin Horstman <khaneliman12@gmail.com>
@sochotnicky sochotnicky force-pushed the sochotnicky/support-idlehint branch from 41f1642 to 5af2d6e Compare April 2, 2026 06:21
@khaneliman
Copy link
Copy Markdown
Collaborator

Change looks fine, but wondering if it needs a dedicated option or can a user already use extraArgs?

@sochotnicky
Copy link
Copy Markdown
Author

Change looks fine, but wondering if it needs a dedicated option or can a user already use extraArgs?

You know I must have missed that extraArgs - you are right. Using that's an option. I'll leave it up to maintainers to decide - either way is fine. Separate option might be easier to understand/notice given other options but 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants